import './index.scss';
import { Button,  Form, Input, Select,Space } from 'antd';
import React, { useState } from 'react';
const { Option } = Select;

const AuthorQuery=()=>{
    const [form] = Form.useForm();
    const onFinish = (values) => {
        console.log('查询 ', values);
      };
      const submit = () => {
        const a= form.getFieldsValue(true)
          console.log(a)
      };
      const onReset = () => {
          form.resetFields();
      };
    return <div className='queryBox'>
        <Form
            form={form}
            name='authorform'
            onFinish={onFinish}
            layout="inline"
            
        >
            <Space size={"middle"}>
                <Form.Item
                    label="作者姓名"
                    name="author"
                    > 
                    <Input placeholder='作者姓名' />
                </Form.Item>
                <Form.Item
                    label="状态"
                    name="status">
                <Select style={{width: 120}}>
                    <Option value='正常'>正常</Option>
                    <Option value='冻结'>冻结</Option>
                </Select> 
                </Form.Item>
                <Button  onClick={onReset} className='btnStyle'>重置</Button>
                <Button type='primary' onClick={submit} className='btnStyle'>搜索</Button>
            </Space>
            
        </Form>
    </div>
}
export default AuthorQuery;